package com.jiangnan.warehouse_management.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.sql.Timestamp;
import java.util.List;

@Data
public class WarehouseQueryResponse {
    private List<Warehouses> list; // 用户列表
    private Long total; // 总记录数
    private Integer page; // 当前页码
    private Integer pageSize; // 每页数量
    @Data
    public static class Warehouses {
        private Integer warehouseId;
        private String warehouseName;
        private String location;
        private Double capacity;
        private Boolean status;
        private Integer managerId;
        private ManagerDTO manager;
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
        private Timestamp createdAt;
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
        private Timestamp updatedAt;

        @Data
        public static class ManagerDTO {
            private Integer userId;
            private String username;
            private String realName;
        }
    }
}